<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
        <block slot="content">会员风采</block>
      </fu-custom>
      <!---flex布局flex布局开始-->
      <view class="flex flex-wrap align-center benben-flex-layout">
        <button class='huiyuanyouxi_fd1_0' @tap.stop="submitFunc()">确认发布</button>
        <view class='flex flex-wrap huiyuanyouxi_fd1_1'>
          <textarea class='flex huiyuanyouxi_input_fd1_1' :placeholder="'描写一下详情信息吧…'" :maxlength="240" :show-num='true'
            placeholder-style="color:#999;font-size:28rpx" v-model="describe" />
          <template>
            <view class='flex flex justify-end huiyuanyouxi_numberfd1_1_c0'>
              <text>{{describe.length}}</text>
              <text>/</text>
              <text>240</text>
            </view>
          </template>
        </view>
        <view class='flex flex-wrap align-center self-center huiyuanyouxi_fd1_2'>
          <text class='huiyuanyouxi_fd1_2_c0'>上传图片/视频</text>
        </view>
        <benben-images-upload ref="benbenImagesUploadfd1_3" :img-list.sync="imgUrl" :img-ids.sync="files"
          :maxlength="9">
          <template #content="{ num, maxlength, isShow, imgList }">
            <view class="flex flex-wrap align-start flex huiyuanyouxi_fd1_3">

              <view v-for="(image, index) in imgList" :key="index" class='flex position-relative huiyuanyouxi_fd1_30'>
                <text class='fu-iconfont2 position-absolute huiyuanyouxi_fd1_300'
                  @tap.stop="$refs.benbenImagesUploadfd1_3.delImage(index)">&#xE8E7;</text>
                <image class='huiyuanyouxi_fd1_301' @tap.stop="$refs.benbenImagesUploadfd1_3.previewImage(index)"
                  mode="aspectFit" :src='image'></image>
              </view>

              <image class='huiyuanyouxi_fd1_31' @tap.stop="$refs.benbenImagesUploadfd1_3.manyChooseImage()"
                v-if="isShow" mode="aspectFit" :src='STATIC_URL+"297.jpg"'></image>

            </view>
          </template>
        </benben-images-upload>
        <view class='flex flex-wrap align-center flex-sub huiyuanyouxi_fd1_4'>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-wrap align-center justify-between flex-sub huiyuanyouxi_fd2_0'>
          <view class='flex flex-wrap align-center'>
            <image class='huiyuanyouxi_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"531.png"'></image>
            <text class='huiyuanyouxi_fd2_0_c0_c1'>{{city}}</text>
          </view>
          <image class='huiyuanyouxi_fd2_0_c1' mode="aspectFit" :src='STATIC_URL+"532.png"'></image>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-wrap align-center justify-between flex-sub huiyuanyouxi_fd3_0'>
          <view class='flex flex-wrap align-center'>
            <image class='huiyuanyouxi_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"533.png"'></image>
            <text class='huiyuanyouxi_fd3_0_c0_c1'>游戏标签</text>
            <image class='huiyuanyouxi_fd3_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"534.png"'></image>
          </view>
          <view class='flex flex-wrap align-center'>
            <input class='huiyuanyouxi_fd3_0_c1_c0' type="text" :placeholder="`#特色美食`" confirm-type="done"
              :maxlength="100" :disabled='true' placeholder-style="color:rgba(64, 143, 236, 1);font-size:28rpx"
              v-model="membergame_id" />
            <image class='huiyuanyouxi_fd3_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"532.png"'></image>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "describe": "",
        "files": "",
        "city": "",
        "address": "",
        "membergame_id": "",
        "imgUrl": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //提交
      async submitFunc() {
        if (!validate(this.describe, 'require')) {
          this.$message.info('请输入描述');
          return false;
        }
        if (!validate(this.files, 'require')) {
          this.$message.info('请上传图片');
          return false;
        }
        if (!validate(this.city, 'require')) {
          this.$message.info('请选择地址');
          return false;
        }
        //请求方法
        //数据验证

        let data6572bbf7e8eb1 = await this.$api.post(global.apiUrls.post6572bbf7e8eb1, {
          describe: this.describe,
          files: this.files,
          city: this.city,
          address: this.address,
          membergame_id: this.membergame_id
        });

        if (data6572bbf7e8eb1.data.code != 1) {
          this.$message.info(data6572bbf7e8eb1.data.msg);
          return
        }



        this.$urouter.navigateBack(1);
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: var(--benbenbgColor1);
    background-size: 100% auto;
  }

  .huiyuanyouxi_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .huiyuanyouxi_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333333;
    line-height: 88rpx;
  }

  .huiyuanyouxi_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .huiyuanyouxi_fd0_0_c0 {
    width: 120rpx;
  }

  .huiyuanyouxi_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .huiyuanyouxi_fd1_4 {
    background: rgba(246, 247, 249, 1);
    height: 20rpx;
    background-size: 100% auto;
  }

  .huiyuanyouxi_fd1_31 {
    width: 160rpx;
    height: 160rpx;
    margin: 0rpx 24rpx 24rpx 0rpx;
  }

  .huiyuanyouxi_fd1_301 {
    width: 160rpx;
    height: 160rpx;
  }

  .huiyuanyouxi_fd1_300 {
    top: 0rpx;
    right: 0rpx;
    z-index: 10;
    color: var(--benbenFontColor1);
  }

  .huiyuanyouxi_fd1_30 {
    margin: 0rpx 24rpx 24rpx 0rpx;
  }

  .huiyuanyouxi_fd1_3 {
    width: 750rpx;
    padding: 24rpx 0rpx 0rpx 24rpx;
  }

  .huiyuanyouxi_fd1_2_c0 {
    padding: 12rpx 0rpx 24rpx 0rpx;
    font-size: 32rpx;
  }

  .huiyuanyouxi_fd1_2 {
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .huiyuanyouxi_numberfd1_1_c0 {
    width: 100%;
    font-size: 24rpx;
    color: var(--benbenFontColor1);
    line-height: 46rpx;
    font-weight: 400;
  }

  .huiyuanyouxi_input_fd1_1 {
    width: 100%;
    height: 140rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #333;
    white-space: pre-wrap;
  }

  .huiyuanyouxi_fd1_1 {
    background: #F6F7F9;
    width: 686rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 20rpx 20rpx 0rpx 20rpx;
    margin: 40rpx 32rpx 40rpx 32rpx;
  }

  .huiyuanyouxi_fd1_0 {
    background: var(--benbenbgColor7);
    border-radius: 44rpx;
    width: 686rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    position: fixed;
    bottom: calc(80rpx + var(--window-bottom));
    left: 32rpx;
  }

  .huiyuanyouxi_fd2_0_c1 {
    width: 14rpx;
    height: 26rpx;
  }

  .huiyuanyouxi_fd2_0_c0_c1 {
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .huiyuanyouxi_fd2_0_c0_c0 {
    width: 32rpx;
    height: 33rpx;
  }

  .huiyuanyouxi_fd2_0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
    margin: 0rpx 24rpx 0rpx 24rpx;
  }

  .huiyuanyouxi_fd3_0_c1_c1 {
    width: 14rpx;
    height: 26rpx;
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .huiyuanyouxi_fd3_0_c1_c0 {
    text-align: right;
  }

  .huiyuanyouxi_fd3_0_c0_c2 {
    width: 28rpx;
    height: 28rpx;
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .huiyuanyouxi_fd3_0_c0_c1 {
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .huiyuanyouxi_fd3_0_c0_c0 {
    width: 32rpx;
    height: 33rpx;
  }

  .huiyuanyouxi_fd3_0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
    margin: 0rpx 24rpx 0rpx 24rpx;
  }
</style>